<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">


<head>
    <script th:src="@{/layui/layui.all.js}"></script>
    <link  th:href="@{/layui/css/layui.css}" rel="stylesheet">

</head>
<body>

<h1 id="test_h">11111111111111111111111111111111111111111</h1>
<button id="test_btn">测试</button>
<p th:text="${msg}"></p>
<script th:src="@{/common/jquery.js}" ></script>
<script>
    $("#test_btn").click(function () {
        $.ajax({
            url:"/test/fragment",
            type:"GET",
            // dataType: "JSON",
            success:function(result){
                $("#test_h").html(result);
                layer.msg('13213');
            }
        });
        // $("#test_h").html("123");
    });
</script>
</body>
</html>